/**
 * Class: Assert
 *
 * Purpose: Basic assertion
 *
 * @author Ken Scott
 */
package org.openfantasia.util;

public class Assert {

	public static void truth(boolean isTrue) {
		if (!isTrue) {
			throw new AssertionException();
		}
	}

	public static void truth(boolean isTrue, String errMsg) {
		if (!isTrue) {
			throw new AssertionException(errMsg);
		}
	}


	public static class AssertionException extends RuntimeException {

		public AssertionException() {
		}


		public AssertionException(String msg) {
			super(msg);
		}
	}
}
